package cn.zjh.sentinel;


import cn.zjh.domian.User;

import org.springframework.web.bind.annotation.PathVariable;


// openfeign整合sentinel
public class OrderFallbackClass {


    //必须参数增加一个Throwable，否则报错
    public static User getByIdFallback(@PathVariable("id") Long id, Throwable e) {
        return new User(-1L, "降级了", "服务不可调用，请稍后重试！");
    }
}
